//
//  ViewController.m
//  PictureBook
//
//  Created by 李昊林 on 16/7/20.
//  Copyright © 2016年 李昊林. All rights reserved.
//

#import "ViewController.h"
#define kScreenBounds [UIScreen mainScreen].bounds
// 1.全大写
#define WIDTH [UIScreen mainScreen].bounds.size.width
#define HEIGHT [UIScreen mainScreen].bounds.size.height
// 2. k + 驼峰命名法
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
@interface ViewController ()<UIScrollViewDelegate>

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    //scrollView.contentOffset = CGSizeMake(WIDTH *4, 0);
    scrollView.pagingEnabled = YES;
    scrollView.delegate = self;
    scrollView.pagingEnabled = 1;
    scrollView.maximumZoomScale = 2;
    
    [self.view addSubview:scrollView];
    NSArray *arr = [NSArray arrayWithObjects:@"1.pic.jpg",@"屏幕快照 2016-07-15 19.36.05.png",@"屏幕快照 2016-07-15 19.36.25.png", nil];
    for (int i = 0; i < arr.count; i ++) {
        UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(1 *WIDTH, 0, WIDTH, HEIGHT)];
        imageView.image = [UIImage imageNamed:arr[1]];
        imageView.userInteractionEnabled = YES;
        [scrollView addSubview:imageView];
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
